<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="ManageAttributes.aspx.cs" Inherits="Admin_ManageAttributes" Title="APM - Properties" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="attributes">
        <ul id="path">
            <li><a href="../Home.aspx">Home</a> &gt;</li>
            <li>Administration &gt;</li>
            <li>Properties</li>
        </ul>
        <h3 class="attributes"><span>Properties</span></h3>
        <div id="content">
            <p>
            </p>
            <table width="100%">
                <tr>
                    <td align="left" style="font-weight: bold">
                        Managing Application Properties</td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        Existing Properties
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:GridView ID="gridPropertyEnabled" runat="server" AllowPaging="True" AllowSorting="True" OnRowDataBound="gridPropertyEnabled_RowDataBound"
                            OnRowDeleted="gridPropertyEnabled_RowDeleted" DataSourceID="obdsPropertyEnabled"
                            AutoGenerateColumns="False" AutoGenerateEditButton="False" CssClass="table" DataKeyNames="AttributeID"
                            EmptyDataText="No Properties has been enabled."
                            PageSize="10" ToolTip="This table shows all Enabled Properties in the APM System.">
                            <AlternatingRowStyle CssClass="alternate" />
                            <PagerSettings Position="TopAndBottom" />
                            <PagerStyle CssClass="pages" />
                            <EmptyDataRowStyle BackColor="#C4D7D6" BorderStyle="none" />
                            <HeaderStyle HorizontalAlign="Left" />
                            <Columns>
                                <asp:CommandField HeaderText="Select" ButtonType="link" ShowDeleteButton="true" DeleteText="Disable"
                                    HeaderStyle-HorizontalAlign="left" ItemStyle-HorizontalAlign="left">
                                    <ItemStyle Width="110px" Wrap="False" />
                                </asp:CommandField>
                                <asp:BoundField HeaderText="Property Name" DataField="AttributeName" SortExpression="AttributeName"
                                    ReadOnly="True" HtmlEncode="true">
                                    <ItemStyle Wrap="True" />
                                </asp:BoundField>
                            </Columns>
                            <RowStyle HorizontalAlign="Left" />
                        </asp:GridView>
                        <asp:ObjectDataSource ID="obdsPropertyEnabled" runat="server" TypeName="Microsoft.AceEngineering.SPM.SPMBusinessLayer.AttributesBL"
                            SelectMethod="GetEnableAttributes" OldValuesParameterFormatString="{0}" SortParameterName="dir"
                            DeleteMethod="DisableAttribute">
                            <DeleteParameters>
                                <asp:Parameter Name="AttributeID" Type="String" />
                                <asp:SessionParameter Name="ModifiedBy" SessionField="loginname" Type="String" />
                            </DeleteParameters>
                        </asp:ObjectDataSource>
                    </td>
                </tr>
                <tr>
                    <td><br />
                        Existing Disabled Properties
                    </td>
                </tr>
                <tr>
                <td>
                    <asp:GridView ID="gridPropertyDisabled" runat="server" AllowPaging="True" AllowSorting="True"
                        OnRowDeleted="gridPropertyDisabled_RowDeleted" DataSourceID="obdsPropertyDisabled"
                        AutoGenerateColumns="False" AutoGenerateEditButton="False" CssClass="table" DataKeyNames="AttributeID"
                        EmptyDataText="No Properties has been disabled."
                        PageSize="10" ToolTip="This table shows all Disabled Properties in the APM System.">
                        <AlternatingRowStyle CssClass="alternate" />
                        <PagerSettings Position="TopAndBottom" />
                        <PagerStyle CssClass="pages" />
                        <EmptyDataRowStyle BackColor="#C4D7D6" BorderStyle="none" />
                        <HeaderStyle HorizontalAlign="Left" />
                        <Columns>
                            <asp:CommandField HeaderText="Select" ButtonType="link" ShowDeleteButton="true" DeleteText="Enable"
                                HeaderStyle-HorizontalAlign="left" ItemStyle-HorizontalAlign="left">
                                <ItemStyle Width="110px" Wrap="False" />
                            </asp:CommandField>
                            <asp:BoundField HeaderText="Property Name" DataField="AttributeName" SortExpression="AttributeName"
                                ReadOnly="True" HtmlEncode="true">
                                <ItemStyle Wrap="True" />
                            </asp:BoundField>
                        </Columns>
                        <RowStyle HorizontalAlign="Left" />
                    </asp:GridView>
                    <asp:ObjectDataSource ID="obdsPropertyDisabled" runat="server" TypeName="Microsoft.AceEngineering.SPM.SPMBusinessLayer.AttributesBL"
                        SelectMethod="GetDisableAttributes" OldValuesParameterFormatString="{0}" SortParameterName="dir"
                        DeleteMethod="EnableAttribute">
                        <DeleteParameters>
                            <asp:Parameter Name="AttributeID" Type="String" />
                            <asp:SessionParameter Name="ModifiedBy" SessionField="loginname" Type="String" />
                        </DeleteParameters>
                    </asp:ObjectDataSource>
                </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>
